package com.reremouse.rerebbs.model;

import com.reremouse.util.Cat;

public class FileSaveStatus {
    String id = Cat.getUniqueId();
    long total = 0L;
    long readed = 0L;
    float percent = 0.0F;
    boolean saving = false;

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public float getPercent() {
        if (this.total == 0L) {
            return 0.0F;
        }
        this.percent = ((float) (this.readed / this.total));
        return this.percent;
    }

    public void setPercent(float percent) {
        this.percent = percent;
    }

    public long getReaded() {
        return this.readed;
    }

    public void setReaded(long readed) {
        this.readed = readed;
    }

    public long getTotal() {
        return this.total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public boolean isSaving() {
        return this.saving;
    }

    public void setSaving(boolean saving) {
        this.saving = saving;
    }

    public void reset() {
        this.id = Cat.getUniqueId();
        this.total = 0L;
        this.readed = 0L;
        this.percent = 0.0F;
        this.saving = false;
    }
}



/* Location:           F:\jsp源码\蝙蝠论坛系统\rerebbs\WEB-INF\classes\

 * Qualified Name:     com.reremouse.rerebbs.model.FileSaveStatus

 * JD-Core Version:    0.7.0.1

 */